// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import serverEnv from '../config/serverEnv' //获取后台后台接口的IP和端口号

//导入iview组件以及less并全局注册
// import iView from 'iview';
import '../iview_theme/iview_theme.less';
// import 'iview/dist/styles/iview.css';
/**
 * [Vue.use(iView) 注册iView为全局样式]
 * @type {[type]}
 * 如果想一个模块单独调用ivew里面的一些样式，可以这样使用：
 import Vue from 'vue'
 import {
     Row,
     Col,
 	Button,
 	Message
 } from 'iview';
 Vue.component('Row', Row);
 Vue.component('Col', Col);
 Vue.component('Button', Button);
 Vue.prototype.$Message = Message; //Message的注册应该使用下面的方法
 */
// Vue.use(iView);

//导入store文件
import store from './store/store'


//导入全局axios请求方法
import axios from 'axios'
axios.defaults.baseURL = serverEnv; //设置axios的IP和端口号
axios.defaults.withCredentials = true; //允许携带cookie
Vue.prototype.$axios = axios;

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
	store,
	el: '#app',
	router,
	components: {
		App
	},
	template: '<App/>'
})